package com.clp.protocol.iec104.apdu;

public class ApduCodecTest {

    public static void main(String[] args) {
        String[] sendStrs1 = "68 10 02 00 02 00 30 01 06 00 01 00 01 62 00 0A 00 00".split(" ");
        Apdu sendApdu1 = ApduCodec.decode(sendStrs1);
        System.out.println("sendApdu1" + sendApdu1);

        String[] recvStrs1 = "68 10 02 00 04 00 30 01 07 00 01 00 01 62 00 0A 00 00".split(" ");
        Apdu recvApdu1 = ApduCodec.decode(recvStrs1);
        System.out.println("recvApdu1" + recvApdu1);

        String[] sendStrs2 = "68 12 04 00 04 00 32 01 06 00 01 00 01 62 00 00 00 20 41 00".split(" ");
        Apdu sendApdu2 = ApduCodec.decode(sendStrs2);
        System.out.println("sendApdu2" + sendApdu2);

        String[] recvStrs2 = "68 12 04 00 06 00 32 01 6F 00 01 00 01 62 00 00 00 20 41 00".split(" ");
        Apdu recvApdu2 = ApduCodec.decode(recvStrs2);
        System.out.println("recvApdu2" + recvApdu2);

        String str = " 68 8D 04 00 04 00 0D A0 14 00 01 00 01 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "
                + " 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "
                + "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ";
        final Apdu decodeApdu = ApduCodec.decode(str.split(" "));
        System.out.println(decodeApdu.toString());
    }
}
